package cn.bdqn.mh.mapper;

import cn.bdqn.mh.pojo.Ad;
import cn.bdqn.mh.pojo.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface ArticleMapper {

    //SELECT * FROM tbarticle WHERE flag=1 ORDER BY createDate DESC LIMIT 1
    @Select("SELECT * FROM tbarticle WHERE flag=1 ORDER BY createDate DESC LIMIT 1")
    public List<Article> getVShare();

    @Select("SELECT * FROM tbarticle WHERE flag=2 ORDER BY createDate DESC LIMIT 5")
    public List<Article> getNewsInformation();

    @Select("SELECT * FROM tbarticle WHERE flag=3 ORDER BY createDate DESC LIMIT 5")
    public List<Article> getSearchInformation();
}
